<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    i {
      position: absolute;
      width: 20px;
      height: 20px;
      line-height: 20px;
      text-align: center;
      cursor: pointer;
      font-style: normal;
      background-color: pink;
      color: #fff;
    }
    .box {
      position: relative;
    }
  </style>
</head>
<body>
  <div class="box">
    <img src="./images/tao.png" alt="">
    <i>X</i>
  </div>

  <script>
      var i = document.querySelector('i');
      var box = document.querySelector('.box');

      i.onclick = function (){
          box.style.display = 'none';
      }
  </script>
</body>
</html>